package com.nuo.backend.modules.security.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.nuo.backend.common.utils.PageUtils;
import com.nuo.backend.common.utils.R;
import com.nuo.backend.modules.security.entity.SecUserEntity;
import com.nuo.backend.modules.security.po.JwtPO;
import com.nuo.backend.modules.security.po.RegisterPO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * 系统用户
 *
 * @author nuo
 * @email 3033616351@qq.com
 * @date 2022-12-04 01:55:55
 */
public interface SecUserService extends IService<SecUserEntity> {

    PageUtils queryPage(Map<String, Object> params);

    SecUserEntity getByUsername(String username);

    R getUserBySec();

    R getUserByBodyToken(JwtPO po);

    R register(RegisterPO po);

    R getUserByHeaderToken(HttpServletRequest request);

    R getUserBySession(HttpServletRequest request);

    String getUserAuthorityBySecUserId(Long secUserId);

    void clearUserAuthorityBySecUserId(Long secUserId);

    void clearUserAuthorityBySecRoleIdList(List<Long> secRoleIdList);

    void clearUserAuthorityBySecMenuIdList(List<Long> secMenuIdList);

    Long getUserId();

}

